package com.vnp.vchat.bean;


import android.os.Parcel;
import android.os.Parcelable;

public class ObjTinnhan extends ObjKhachhang implements Parcelable{
	String lastMessage;
	String timeLastMessage;
	
	
	public ObjTinnhan (Parcel in){
		urlAvatar = in.readString();
		name = in.readString();
		lastMessage = in.readString();
		timeLastMessage = in.readString();
	}
	 public ObjTinnhan(){
		 
	 }
	
	
	
	
	public ObjTinnhan(String avatar, String name, String lastMsg, String timeMsg){
		super();
		this.urlAvatar = avatar;
		this.name = name;
		this.lastMessage = lastMsg;
		this.timeLastMessage = timeMsg;
	}
	
	
	@Override
	public String getLastMessage() {
		return lastMessage;
	}
	@Override
	public void setLastMessage(String lastMessage) {
		this.lastMessage = lastMessage;
	}
	@Override
	public String getTimeLastMessage() {
		return timeLastMessage;
	}
	@Override
	public void setTimeLastMessage(String timeLastMessage) {
		this.timeLastMessage = timeLastMessage;
	}


	@Override
	public int describeContents() {
		return 0;
	}


	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(urlAvatar);
		dest.writeString(name);
		dest.writeString(lastMessage);
		dest.writeString(timeLastMessage);
	}
	
	public static final Parcelable.Creator<ObjTinnhan> CREATOR = new Parcelable.Creator<ObjTinnhan>() {
		@Override
		public ObjTinnhan createFromParcel(Parcel in) {
			return new ObjTinnhan(in);
		}

		@Override
		public ObjTinnhan[] newArray(int size) {
			return new ObjTinnhan[size];
		}
	};
	
}
